<%@ page import="java.util.Date"%>
<%@ page import="java.util.ArrayList"%>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>fmtTag</title>
</head>
<body>

<%
	int[] array = {1,2,3,4};
	ArrayList list = new ArrayList();
	list.add("one");
	list.add("two");
	list.add("three");
%>
<c:set value="<%=array%>" var="array"></c:set>
<c:set value="<%=list%>" var="list"></c:set>
数组长度： ${fn:length(array)}<br/> <!-- 4 -->
集合长度： ${fn:length(list)}<br/> <!-- 3 -->
字符串长度： ${fn:length("Tomcat")}<br/> <!-- 6 -->




</body>
</html>